home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: Greatest Hits 1996
/
Amiga Games: Greatest Hits 1996.iso
/
userbox
/
publicdomain
/
yagin
/
archives
/
newpostnewsspool.doc
< prev
next >
Wrap
Text File
|
1996-07-01
|
6KB
|
199 lines
New Post News Spool v4.1
by
Nick d'Alterio
December 1995
#####################
Simple change made by Arndt van der Molen to the 'postnews'
programm. See below.
#####################
Introduction
-------------
A while back I was looking for a way of spooling news so that I could
write articles offline and then send them when I went online. I found
the a set of programs to do this in PostNewsSpool by James Burton.
However I found that there were a number of problems with postnews
and sendnews such as:-
The check to see if online took far too long
Locks were often left on the spool dir
Lots of unnecessary files were produced
If news posting fails for some reason the message was lost
These versions have eliminated these problems and added a couple
of extra features.
Installation
------------
Copy sendnews and postnews to AmiTCP:bin/ and set the appropriate
environment variable described below.
postnews should be the program that is called by your news reading
program to post the news. This will spool the article so that you
can use sendnews to send it off when you go online.
Although it is possible to use to spool news without the rest of the
package I recommend that you get the complete postnewsspool archive
by James Burton.
Updating
--------
Note that from version 3 sendnews will attempt to send any article
in the spooldir no matter what the name is. So if your news reader
produces a fully formed news article with header you can drop it
straight into the spooldir without using postnews.
You should remove the seq file if you had it in your spooldir and
the env variable PNS_SEQFILE
If updating from version 3.x to 4.x note that the postnews argument -from has
now changed to -f.
Sendnews
--------
Simply run the program and it will send off all messages in the
spool directory indicated by the environment variable PNS_SPOOLDIR
(AmiTCP:Usr/Spool/News by default).
The news articles will be posted using the program specified in
PNS_NNTPPOST (AmiTCP:bin/NNTPPost by default ). If the posting program
fails to post the article the article will then be appended to the
end of the failed archive indicated by PNS_FAILED_ARC
( AmiTCP:Usr/Spool/sendnews.failed by default ). Each file in the
failed archive will be separated by a line containing the date and time
sendnews failed to post the article.
Remember that NNTPPost requires that the environment variable NNTPSERVER
is set.
Postnews
--------
This spools a news article ready for posting when online. The article can
be complete with header (as prepared by tin) or in its component parts, in which
case postnews puts them together so that the article is ready for posting (Grn style).
It places the article in the spool directory PNS_SPOOLDIR (AmiTCP:Usr/Spool/News by default).
The spooled filename has the format msg.######### where ###### is a
number which refers to the time of writing.
#####################
Changed by Arndt van der Molen in Version V4.1a
If online at the time of writing the article then postnews immediately
executes the configured PNS_NNTPOST program to send off the article.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To stop postnews from sending the article create an enviroment variable
called PNS_OFFLINE.
#####################
The order of the command line options below is not important. However if the
option -R or the article is specified more than once then the last occurence
will be used.
Command line options:-
-a If not using AmiTCP, this will disable
the online check.
-f "someone@somewhere" Add a from line to the header of
article.
-n Don't call sendnews if online
-R filename Get the article header from the specified
file.
-x filename Delete file if posting is a success.
-h Prints some help
If the parameter for options f, R and x is skipped then the program will print an error
message and exit. (The exception here is if the parameter is skipped and the article
name is the next thing on the command line).
The option -x can appear up to 16 times on the command line after which any additional
usage will be ignored. (This isn't a delete program!!!)
Usage Examples
--------------
postnews article Spools fully formed article
postnews < article Spools fully formed article from stdin
postnews article -x article Spools article then deletes original
postnews body -R header Spools article made from header and body
postnews body -R header -x header -x body As above but deletes the original files
e.g. For tin I use
set TIN_POST amitcp:bin/postnews -from "nagd@doc.ic.ac.uk (Nicholas d'Alterio)" %s
for Grn try
amitcp:bin/postnews .artcle -R .header -x .article -x .header
History
-------
4.1 - Postnews - New command line options -R, -x (for Grn users), -a
- Postnews - Changed check for onlineness
- Postnews - Improved command line checks
3.2 - New enviroment variable PNS_OFFLINE
3.1 - Now uses ADOS functions
- seq file no longer needed
- ANY file in the spooldir will be sent
- the failed archive entries are separated by a line
containing the time the file failed.
- new env variable PNS_NNTPPOST allows user to specify
program to post news
2.1 - Added support for environment variables
1.x - Internal test versions
Conditions of Use
-----------------
Use it how you like just remember I accept NO liability for
ANYTHING that happens.
Let me know of what you think of it, bugs, etc
Thanks
------
Thanks to James Burton for the original idea and code.
Jeroen T Vermeulen for some new ideas.
ToDo
----
Make sendnews a full NNTP posting client (AmiTCP)
------------------------------------------------------------------------------------
Nick d'Alterio (nagd@doc.ic.ac.uk)
$Id: NewPostNewsSpool.doc 1.6 1995/12/19 17:46:28 nagd Exp $